<template>
  <DefaultLayout>
    <div class="not-found-container">
      <div class="error-code">404</div>
      <h1 class="error-title">页面未找到</h1>
      <p class="error-message">抱歉，您请求的页面不存在或已被移除</p>
      <p class="path-info">当前路径: {{ route.fullPath }}</p>
      
      <div class="action-buttons">
        <button class="btn btn-secondary" @click="goBack">返回上一页</button>
        <router-link to="/" class="btn btn-primary">返回首页</router-link>
      </div>
    </div>
  </DefaultLayout>
</template>

<script setup>
import { useRoute, useRouter } from 'vue-router'
import DefaultLayout from '@/components/layout/DefaultLayout.vue'

const route = useRoute()
const router = useRouter()

const goBack = () => {
  router.go(-1)
}
</script>

<style scoped>
.not-found-container {
  text-align: center;
  padding: 5rem 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.error-code {
  font-size: 8rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.error-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.error-message {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--text-light);
}

.path-info {
  font-family: monospace;
  background: var(--background-dark);
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 2rem;
  word-break: break-all;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

@media (max-width: 768px) {
  .error-code {
    font-size: 6rem;
  }
  
  .error-title {
    font-size: 2rem;
  }
  
  .action-buttons {
    flex-direction: column;
  }
}
</style> 